package com.csc.banking.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "UserAttempts",catalog = "mydb")
public class UserAttempts 
{	
	private int id;	
	private String username;	
	private int attempts;	
	private Date lastModified;
	
	public UserAttempts()
	{
		
	}
	public UserAttempts(String username, int attempts, Date lastModified) 
	{
		super();
		this.username = username;
		this.attempts = attempts;
		this.lastModified = lastModified;
	}
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() 
	{
		return id;
	}
	public void setId(int id) 
	{
		this.id = id;
	}
	@Column(name = "Username", unique = true, nullable = false)
	public String getUsername() 
	{
		return username;
	}
	public void setUsername(String username) 
	{
		this.username = username;
	}
	@Column(name = "Attempts")
	public int getAttempts() 
	{
		return attempts;
	}
	public void setAttempts(int attempts) 
	{
		this.attempts = attempts;
	}
	@Column(name = "LastModified")
	public Date getLastModified() 
	{
		return lastModified;
	}
	public void setLastModified(Date lastModified) 
	{
		this.lastModified = lastModified;
	}

}
